//
//  SimpleImageOperation.h
//  SimpleWebImage
//
//  Created by Jiang on 2019/8/26.
//  Copyright © 2019 SilverFruity. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface SimpleImageOperation: NSObject
@property (nonatomic, assign)BOOL isCancel;
@property (nonatomic, copy)void (^completeBlock)(UIImage *image,NSURL *url,NSError * _Nullable error);
@property (nonatomic, copy)void (^progressBlock)(double progress, NSURL *url);
@end

@interface SimpleImageOperationPool : NSObject
@property (nonatomic,strong)NSMutableDictionary *operationCache;
- (void)addOperation:(SimpleImageOperation *)operation forKey:(NSString *)key;
- (void)removeAllOperationsForKey:(NSString *)key;
- (NSArray <SimpleImageOperation *> *)operationsForKey:(NSString *)key;
@end

NS_ASSUME_NONNULL_END
